/**
 * @Title ReturnMassege.java
 * @Package com.eppear.jpfm.framework.common
 * @Description
 * @author JianFeng Zhang(张建锋)
 * @date 2017-01-16 下午11:14:13
 * @version 
 */
package com.eppear.jpfm.framework.common;

import java.io.Serializable;

import com.eppear.jpfm.framework.constants.Constants;

/**
 * @ClassName ReturnMassege
 * @Description
 *         返回消息类,除了返回的值以外,还可以带上一些相关信息
 * @author JianFeng Zhang(张建锋)
 * @param <T>
 * @date   2017-01-16 下午11:14:13
 *
 */
public class ReturnMessage<T> implements Serializable {

	/** 
	 * @Fields
	 *  returnCode : 返回值 具体值 参见 ErrorConstants ,默认为成功
	 *
	 */
	private Integer returnCode = Constants.ERROR_CODE_00000;
	/** @Fields 
	 *  description : 返回的消息
	 *  
	 */
	private String description = "操作成功!";
	/**
	 * @Fields 
	 * data : 返回的数据
	 */
	private T data;
	/**
	 * @Fields
	 *  parameterData : 返回参数
	 */
	private String parameterData;
	
	/**
	 * 构造
	 */
	public ReturnMessage(){
		super();
		returnCode = Constants.ERROR_CODE_00000;
		this.description="操作成功!";
	}
	public ReturnMessage(Integer returnCode, String description) {
		super();
		this.returnCode = returnCode;
		this.description = description;
		
	}
	public ReturnMessage(T data){
		super();
		this.data = data;
	}
	
	public Integer getReturnCode() {
		return returnCode;
	}
	public void setReturnCode(Integer returnCode) {
		this.returnCode = returnCode;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public String getParameterData() {
		return parameterData;
	}
	public void setParameterData(String parameterData) {
		this.parameterData = parameterData;
	}
		
}
